<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri='http://java.sun.com/jsp/jstl/core' prefix='c'%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<script language="javaScript" type="text/javascript"
	src="<c:url value='/cal/calendar.js'/>" >
</script>

<link href="<c:url value='/cal/calendar.css'/>" rel="stylesheet" type="text/css">
<link href="<c:url value='/Styles/style.css'/>" rel="stylesheet" type="text/css" />

</head>
<body>
	<div class="page">
		<div id="header-wrapper">
		                <div id="header">
                		<div id="logo">
							<!-- Header -->
						<h4>&nbsp;</h4>
						</div>
						</div>
		</div>

		<div class="page-wrapper">
			<div class="main">
				<div class="colleft">
					<div class="col1">
						<!-- Side menu -->
						<h4><%@ include file="staff-logout.jsp"%></h4>
						<h4><%@ include file="employee-menu.jsp"%></h4>
						<h4>&nbsp;</h4>
					</div>
					<div class="col2">
						<!-- Main Content -->
						 <form action="DeletLeave" method="post" name="LeaveListForm" >
 <h1>Leave List</h1>

       
   
    <table class="borderAll" border="1">
            <tr>
               <th>No</th>
               
             <th>LeaveID</th>
                <th>StaffID</th>
                <th>FromDate</th>
                <th>ToDate</th>
                <th>Status</th>
                <th>Reason</th>
                <th>Contact Details</th>
        
                <th>Edit</th>
                <th>Delete</th>
               </th>
            </tr>
            <c:forEach var="Leave" items="${Leave}" varStatus="status">
                <tr class="${status.index%2==0?'even':'odd'}">
                    <td class="nowrap">${status.index + 1}</td>
                    <td class="nowrap">${Leave.id}</td>
                    <td class="nowrap">00${Leave.id}</td>
                    <td class="nowrap">${Leave.from}</td>
                    <td class="nowrap">${Leave.to}</td>
                     <td class="nowrap">${Leave.status}</td>
                    <td class="nowrap">${Leave.reason}</td>
                    <td class="nowrap">${Leave.contactDetails}</td>
              
                    <td class="nowrap">
               		<c:url var="updurl" scope="page" value="/leaveEdit.jsp">
                    	    <c:param name="id" value="${Leave.id}"/>
                            <c:param name="userid" value="00${Leave.id}"/>
                            <c:param name="from" value="${Leave.from}"/>
                            <c:param name="to" value="${ Leave.to}"/>
                            <c:param name="reason" value="${Leave.reason}"/>
                            <c:param name="contactDetails" value="${Leave.contactDetails}"/>
                    </c:url>
                          <a href="${updurl}">edit</a>
                        &nbsp;&nbsp;&nbsp;
                        </td>
                        <td>
                        
                        <c:url var="delurl" scope="page" value="/deleteLeave">
                            <c:param name="name" value="${Leave.id}"/>
                        </c:url>
                        <a href="${delurl}">delete</a>                  
                    </td>
                </tr>
            </c:forEach>
        </table>
        </form>
						<h4>&nbsp;</h4>						
					</div> <!-- end col2 -->
					
				</div> <!-- end colleft -->
				
			</div> <!-- end main -->

		</div> <!-- end page-wrapper -->

	</div> <!-- end page -->

</body>
</html>